<!DOCTYPE html>
<html lang="utf-8">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,Chrome=1" />
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->
    <title>易备安数据管理平台</title>

    <!-- Bootstrap -->
    <link href="/web/css/bootstrap/bootstrap.min.css" rel="stylesheet">
    <link href="/web/css/bootstrap/bootstrap-theme.min.css" rel="stylesheet">

    <link href="/web/css/jquery.datetimepicker.css" rel="stylesheet" type="text/css"/>
    <link href="/web/css/jquery-ui.css" rel="stylesheet" type="text/css"/>
    <link href="/web/css/jquery-ui.theme.css" rel="stylesheet" type="text/css"/>
    <link href="/web/js/jstree/themes/default/style.min.css" rel="stylesheet">

    <link href="/web/js/zTree_v3/css/demo.css" rel="stylesheet" />
    <link href="/web/js/zTree_v3/css/zTreeStyle/zTreeStyle.css" rel="stylesheet" /> 
 
    <link rel="stylesheet" type="text/css" href="/web/css/client-common.css">
    <link rel="stylesheet" type="text/css" href="/web/css/g.css">
    <link rel="stylesheet" href="/web/css/ui.css">
    <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
    <script src="//cdn.bootcss.com/html5shiv/3.7.2/html5shiv.min.js"></script>
    <script src="//cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
    <link rel="stylesheet" type="text/css" href="/web/css/basic.css">
    <style type="text/css">
    	.db-config{
    		display:none;
    	}
    </style>
</head>
<body>
<div class="container">
<input type="hidden" id="h_id" value="">
<input type="hidden" id="h_config_id" value="">
<input type="hidden" id="h_backstrategy_id" value="">
<input type="hidden" id="h_which_path" value="">
    <div class="container">
    	<div style="width:100%;overflow:hidden;padding:10px 0;border-bottom:solid 1px #ddd">
    		<button style="float:right;margin-right:20px;" type="button" class="btn btn-lg btn-info g-mr10"
                       onclick="window.history.go(-1)">返回
               </button>
    	</div>
        <form id="dsForm" class="form-horizontal">
            <div class="index-page">
                <div class="index-w100 g-mt15 ">
	                <h3 class="index-title">基本信息</h3>
	                <div class="inner-body">
	                    <div class="form-group">
	                        <label for="dsName" class="col-sm-2 control-label">数据源名称：</label>
	                        <div class="col-sm-3">
	                            <input type="text" class="form-control" id="dsName" disabled>
	                        </div>
	
	                        <label for="createTime" class="col-sm-2 control-label">创建时间：</label>
	                        <div class="col-sm-3">
	                            <input type="text" class="form-control" id="createTime" disabled>
	                        </div>
	
	                    </div>
	                    <div class="form-group" style="display:none">
	                        <label for="description" class="col-sm-2 control-label">数据源描述：</label>
	
	                        <div class="col-sm-10">
	                            <input type="text" class="form-control" id="description" disabled>
	                        </div>
	                    </div>
	                    <div class="form-group">
	                        <label for="dsType" class="col-sm-2 control-label">数据源类型：</label>
	                        <div class="col-sm-2">
	                            <select class="form-control" id="dsType" disabled>
	                                <option value="0">文件夹</option>
	                                <option value="1">数据库</option>
	                                <option value="2">数据保险箱</option>
	                            </select>
	                        </div>
	                    </div>
	                    <div class="form-group ds-path">
	                        <label for="dsPath" class="col-sm-2 control-label">数据源路径：</label>
	                        <div class="col-sm-10">
	                            <input type="text" class="form-control" id="dsPath" disabled>
	                        </div>
	                    </div>
	                    <div class="form-group db-config">
		                    <label for="dbUsername" class="col-sm-2 control-label">数据库登入名：</label>
	                        <div class="col-sm-3">
	                            <input type="text" class="form-control" id="dbUsername">
	                        </div>
	                        <label for="dbPassword" class="col-sm-2 control-label">登入密码：</label>
	                        <div class="col-sm-3">
	                            <input type="text" class="form-control" id="dbPassword">
	                        </div>
	                    </div>
	                    <div class="form-group db-config">
	                    	<label for="dbType" class="col-sm-2 control-label">数据库类型：</label>
	                        <div class="col-sm-3">
	                            <select class="form-control" id="dbType" disabled>
	                                <option value="0">MySql</option>
	                            </select>
	                        </div>
	                        <label for="dbName" class="col-sm-2 control-label">数据库名称：</label>
	                        <div class="col-sm-3">
	                            <input type="text" class="form-control" id="dbName">
	                        </div>
	                    </div>
	                    <div class="form-group db-config">
	                    	<label for="dbHost" class="col-sm-2 control-label">数据库ip地址：</label>
	                        <div class="col-sm-3">
	                            <input type="text" class="form-control" id="dbHost">
	                        </div>
	                        <label for="dbPort" class="col-sm-2 control-label">数据库端口号：</label>
	                        <div class="col-sm-3">
	                            <input type="text" class="form-control" id="dbPort">
	                        </div>
	                    </div>
	                    <div class="form-group clearfix">
		                     <label for="dsNeedKey" class="col-sm-2 control-label">操作需要key：</label>
		                     <div class="col-sm-1 g-mt5" >
		                         <input type="checkbox" class="j-checkbox" class="form-control" id="dsNeedKey">
		                     </div>
		                     <label for="dsNeedCode" class="col-sm-3 control-label">操作需要动态验证码：</label>
		                     <div class="col-sm-1 g-mt5" >
		                         <input type="checkbox" class="j-checkbox" class="form-control" id="dsNeedCode">
		                     </div>
		                     <label for="isEncrypt" class="col-sm-3 control-label">是否加密(不能更改)：</label>
		                     <div class="col-sm-1 g-mt5" >
		                         <input disabled="disabled" type="checkbox" class="j-checkbox" class="form-control" id="isEncrypt">
		                     </div>
		                 </div>
		                 <div class="form-group clearfix">
		                     <label for="isOpenLocalBackup" class="col-sm-2 control-label">开启本地备份：</label>
	                         <div class="col-sm-1" style="margin-top:4px;">
	                             <input type="checkbox" class="j-checkbox" class="form-control" id="isOpenLocalBackup">
	                         </div>
		                 </div>
	                    <div class="form-group" style="display: none">
	                        <label for="scanType" class="col-sm-2 control-label">扫描模式：</label>
	                        <div class="col-sm-10">
	                            <select class="form-control" id="scanType">
	                                <option value="0">扫描所有文件</option>
	                            </select>
	                        </div>
	                    </div>
	                    <div class="form-group scan-checkbox" style="display: none">
	                        <div class="col-sm-1"></div>
	                        <div  class="col-sm-2"><label><input type="checkbox" class="j-checkbox" id="idScanHideFile" name="scanHideFile">扫描隐藏文件</label></div>
	                        <div  class="col-sm-2"><label><input type="checkbox" class="j-checkbox" id="idRecordCanNotReadFileInfo" name="idRecordCanNotReadFileInfo">记录不可读文件</label></div>
	                        <div  class="col-sm-2"><label><input type="checkbox" class="j-checkbox" id="idRecordEmptyDirectory" name="recordEmptyDirectory">记录空文件</label></div>
	                        <div  class="col-sm-2"><label><input type="checkbox" class="j-checkbox" id="idRecordEmptyFile" name="recordEmptyFile">记录空目录</label></div>
	                        <div  class="col-sm-2"><label><input type="checkbox" class="j-checkbox" id="idVerifyCompleteName" name="verifyCompleteName">进行完整性验证</label></div>
	                    </div>
	                </div>
	            </div>
            </div>
           <div class="index-page backup-strategy">
                <div class="index-w100 g-mt15 ">
	                <h3 class="index-title">备份策略</h3>
	                <div class="inner-body">                     
	                    <div class="form-group clearfix">	                       
                            <label for="datetimepicker" class="col-sm-2 control-label">开始时间:</label>
                            <div class="col-sm-3">
                                <input type="text" class="form-control" id="datetimepicker">
                            </div>
                            <label for="backupCycle" class="control-label col-sm-2">时间间隔：</label>
                            <div class="col-sm-2">
                                <input id="backupCycle" name="backupCycle"  class="form-control" style="*width:90%">
                            </div>
                            <div class="col-sm-2">
                                <select class="form-control" id="backupPeriod">
                                    <option value="1">小时</option>
                                    <option value="2">天</option>
                                    <option value="3">周</option>
                                    <option value="4">月</option>
                                </select>
                            </div>
	                    </div>
	                 </div>
                </div>
            </div>

            <div class="control-group g-mt15 g-ar" >
            	<button id="back" type="button" class="btn btn-lg btn-info g-mr10"
                        onclick="window.history.go(-1)">取消
                </button>
                <button id="save" type="button" class="btn btn-lg btn-info g-mr10"
                        onclick="saveDataSource();">保存
                </button>
            </div>
        </form>
    </div>

</div>

<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
<script src="/web/js/jquery/jquery.min.js"></script>
<script src="/web/js/bootstrap/bootstrap.min.js"></script>
<script src="/web/js/zTree_v3/js/jquery.ztree.core-3.5.js"></script>
<script src="/web/js/jquery_rest.js"></script>
<script src="/web/js/ebeim.js"></script>

<script src="/web/js/jquery/jquery-ui.js"></script>
<!-- Include all compiled plugins (below), or include individual files as needed -->
<script src="/web/js/jquery/jquery.datetimepicker.js"></script>
<script src="/web/js/jquery/jquery.icheck.min.js"></script>

<script src="js/datasource_detail.js"></script>

<div class="modal fade" id="myModal" tabindex="-1" role="dialog" style="max-height:500px;overflow-y:auto" 
   aria-labelledby="myModalLabel" aria-hidden="true">
   <div class="modal-dialog">
      <div class="modal-content">
         <div class="modal-header">
            <button type="button" class="close" 
               data-dismiss="modal" aria-hidden="true">
                  &times;
            </button>
            <h4 class="modal-title" id="myModalLabel">
            点击获取验证码，系统将向您的手机发送验证码。
            </h4>
         </div>
         <div class="modal-body" id="modal-body" style="text-align: center;">
            <input style="margin-right:15px;" class="input input-large" type="text" id="dynamicCode"/>
            <button id="sendCodeBtn" onclick="send()" class="btn btn-success">获取验证码</button>
         </div>
         <div class="modal-footer">
            <!-- <button type="button" class="btn btn-default" 
               data-dismiss="modal">关闭
            </button> -->
            <button id="submit" onclick="setDynamicCode()" type="button" class="btn btn-primary">
              确定
            </button>
         </div>
      </div><!-- /.modal-content -->
</div>
</body>
</html>